<template>
  <div class="track-info">
    <a-timeline>
      <template v-for="item in passData" :key="item.id">
        <a-timeline-item>
          <div style="display: flex; justify-content: space-between">
            <div>{{ dayjs(Number(item.nodeTime)).format("YYYY-MM-DD HH:mm:ss") }} &nbsp;&nbsp;&nbsp; {{ item.content }}</div>
            <!-- <div>
              <a-button type="link" @click="modifyTrackInfoHandle(item)">修改</a-button>
              <a-button type="link" danger @click="deleteHandle(item)">删除</a-button>
            </div> -->
          </div>
        </a-timeline-item>
      </template>
    </a-timeline>

    <!-- <a-modal v-model:visible="dialogOpts.visible" :maskClosable="false" :keyboard="false" :footer="null" :title="dialogOpts.title" :width="dialogOpts.width">
      <component v-model:visible="dialogOpts.visible" :is="dialogOpts.component" :type="dialogOpts.type" :pass-data="dialogOpts.passData" @submit="dialogSubmitHandle"></component>
    </a-modal> -->
  </div>
</template>

<!-- <script lang="ts">
import ModifyTrackInfo from "./components/modifyTrackInfo/index.vue";

export default {
  components: {
    ModifyTrackInfo
  }
};
</script> -->

<script lang="ts" setup>
import dayjs from "dayjs";
import { toRefs } from "vue";

// const emit = defineEmits<{
//   (e: "submit"): void;
//   (e: "update:visible", visible: boolean): void;
// }>();

// const { dialogOpts } = InitHook();

// const { modifyTrackInfoHandle, dialogSubmitHandle, deleteHandle } = OperationHook({
//   dialogOpts,
//   emit
// });
const props = withDefaults(
  defineProps<{
    passData: Array<ClientWaybillManagement.Logistics>;
  }>(),
  {}
);
const { passData } = toRefs(props);
</script>
<style lang="stylus" scoped>
.track-info{
    padding: 0 12px;
}
</style>
